home *** CD-ROM | disk | FTP | other *** search
Wrap
property mySprite, myCurDisplayNum, myListToDisplay, numToDisplay, myCurDisplay, myCurItemCategory, myCurItemChoice, textDisplayField, progressDisplayField, ancestor, insetSprite, curCost on new me, spriteNum, listToDisplay mySprite = spriteNum textDisplayField = "toolbarTextDisplayField" progressDisplayField = "toolBarProgressDisplayField" myListToDisplay = listToDisplay myCurDisplayNum = 0 numToDisplay = count(myListToDisplay) doNextDisplay(me) return me end on sendSpriteNum me, whichType if whichType = me.myType then return mySprite end if end on upDateOnScreenDisplays me put "sprite" && mySprite & "got <upDateOnScreenDisplays>" if voidp(insetSprite) then insetSprite = sendAllSprites(#sendSpriteNum, #IntInset) end if sendSprite(insetSprite, #show, myCurItemChoice) updateOnScreenText(me) end on doNextDisplay me if voidp(insetSprite) then insetSprite = sendAllSprites(#sendSpriteNum, #IntInset) end if if myCurDisplayNum = numToDisplay then exit end if myCurDisplayNum = myCurDisplayNum + 1 myCurDisplay = myListToDisplay[myCurDisplayNum] myCurItemCategory = symbol(word 2 of myCurDisplay) myCurItemChoice = symbol(word 2 of myCurDisplay & "_" & word 3 of myCurDisplay) set the member of sprite mySprite to member(myCurDisplay) sendSprite(insetSprite, #show, myCurItemChoice) updateOnScreenText(me) if myCurDisplayNum = numToDisplay then return #LastDisplay else return 1 end if end on doPreviousDisplay me if myCurDisplayNum = 1 then exit end if if voidp(insetSprite) then insetSprite = sendAllSprites(#sendSpriteNum, #IntInset) end if myCurDisplayNum = myCurDisplayNum - 1 myCurDisplay = myListToDisplay[myCurDisplayNum] myCurItemCategory = symbol(word 2 of myCurDisplay) myCurItemChoice = symbol(word 2 of myCurDisplay & "_" & word 3 of myCurDisplay) set the member of sprite mySprite to member(myCurDisplay) sendSprite(insetSprite, #show, myCurItemChoice) updateOnScreenText(me) if myCurDisplayNum = 1 then return #FirstDisplay else return 1 end if end on getCurDisplayStatus me if myCurDisplayNum = 1 then return #First else if myCurDisplayNum = numToDisplay then return #last else return #mid end if end if end on getCurChoice me myChoice = symbol(word 3 of myCurDisplay) return myChoice end on getCurCost me return curCost end on updateOnScreenText me global gToolBarTextMan, gCostMan progressText = myCurDisplayNum && "of" && numToDisplay put progressText into field progressDisplayField displayText = getInfoDisplayText(me) useAsString = 1 setToolBarText(gToolBarTextMan, displayText, useAsString) end on getInfoDisplayText me, curDisplay global gCostMan, gConMan case myCurItemCategory of #flooring: curRoom = sendAllSprites(#sendFlooringRoomType) curCost = getFlooringCosts(gCostMan, curRoom, myCurItemChoice) case curRoom of #bath: displayString = "To choose this material for all bathroom floors, " && RETURN put "hit the PURCHASE button. Cost: " & formatMonetaryForDisplay(curCost) after displayString #kitchen: displayString = "To choose this material for your kitchen floor, " && RETURN put "hit the PURCHASE button. Cost: " & formatMonetaryForDisplay(curCost) after displayString #other: displayString = "To choose this material for all other floors, " && RETURN put "hit the PURCHASE button. Cost: " & formatMonetaryForDisplay(curCost) after displayString end case #bath: curCost = getInteriorItemCost(gCostMan, myCurItemChoice) numBathrooms = getNumBathrooms(gConMan) case numBathrooms of 2: numBathString = "two" 3: numBathString = "three" 4: numBathString = "four" 5: numBathString = "five" end case numBathRoomsDecided = getNumBathroomsDecided(gConMan) thisBathRoom = getNextInteriorDecision(gConMan) displayString = EMPTY if thisBathRoom = #masterbathroom then if numBathrooms = 1 then put "You have planned one bathroom. To choose this style for your master bathroom hit the PURCHASE button. Cost: " & formatMonetaryForDisplay(curCost) after displayString else put "You have planned " && numBathString && "bathrooms. You need to select a style for each bathroom. To choose this style for your master bathroom hit the PURCHASE button. Cost: " & formatMonetaryForDisplay(curCost) after displayString end if else if numBathrooms = 1 then put "You have planned one bathroom.To choose this style for your bathroom hit the PURCHASE button. Cost: " & formatMonetaryForDisplay(curCost) after displayString else if numBathRoomsDecided = 0 then put "You have planned " && numBathString && "bathrooms. You need to select a style for each bathroom. To choose this style for your first bathroom hit the PURCHASE button. Cost: " & formatMonetaryForDisplay(curCost) after displayString else case numBathRoomsDecided of 1: whichBath = "second" 2: whichBath = "third" 3: whichBath = "fourth" 4: whichBath = "fifth" end case put "Please select a style for the" && whichBath && "bathroom. To choose this type for your" && whichBath && "bathroom, hit the PURCHASE button. Cost: " & formatMonetaryForDisplay(curCost) after displayString end if end if end if #kitchenStyles: curCost = getInteriorItemCost(gCostMan, myCurItemChoice) displayString = "To choose this type of kitchen for your house hit the PURCHASE button. Cost: " put formatMonetaryForDisplay(curCost) after displayString #staircases: curCost = getInteriorItemCost(gCostMan, myCurItemChoice) displayString = "To choose this type for all staircases, hit the PURCHASE button. Cost: " put formatMonetaryForDisplay(curCost) after displayString #fireplaces: curCost = getInteriorItemCost(gCostMan, myCurItemChoice) displayString = "To choose this type for all fireplaces, hit the PURCHASE button. Cost: " put formatMonetaryForDisplay(curCost) after displayString #intAm, #interiorAmenities: curCost = getInteriorItemCost(gCostMan, myCurItemChoice) displayString = "You may select additional amenities for your home. When you have selected and purchased the amenities you desire, if any, hit COMPLETE. To choose this amenity, hit the PURCHASE button. Cost: " put formatMonetaryForDisplay(curCost) after displayString otherwise: curCost = getInteriorItemCost(gCostMan, myCurItemChoice) displayString = "To choose this item, " && RETURN put "hit the PURCHASE button. Cost: $" & curCost after displayString end case return displayString end